package com.t17;

import java.lang.reflect.InvocationTargetException;

/**
 * Created by xuyiwei on 2018/8/16.
 */
class Groundhog2 extends Groundhog{
    public Groundhog2(int n) {
        super(n);
    }
    public int hashCode(){
        return number;
    }
    public boolean equals(Object o){
        return o instanceof Groundhog2 && (number== ((Groundhog2) o).number);
    }
}
public class SrpingDetector2 {
    public static void main(String[] args) throws InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        SpringDetector.detectSpring(Groundhog2.class);
        /**
         * map = {Groundhog #0=Six more weeks of Winter!, Groundhog #1=Six more weeks of Winter!, Groundhog #2=Early Spring!, Groundhog #3=Early Spring!, Groundhog #4=Six more weeks of Winter!, Groundhog #5=Early Spring!, Groundhog #6=Early Spring!, Groundhog #7=Early Spring!, Groundhog #8=Six more weeks of Winter!, Groundhog #9=Six more weeks of Winter!}
         Looking up prediction forGroundhog #3
         Early Spring!
         */
    }
}
